package com.hpq.chat.service.srategy.mark;

import com.hpq.chat.domain.enums.MessageMarkTypeEnum;
import com.hpq.chat.domain.enums.MessageTypeEnum;
import com.hpq.chat.domain.model.MessageMark;
import org.springframework.stereotype.Component;

@Component
public class DisLikeStrategy extends AbstractMsgMarkStrategy{

    @Override
    protected MessageMarkTypeEnum getTypeEnum() {
        return MessageMarkTypeEnum.DISLIKE;
    }
    @Override
public void doMark(Long uid,Long msgId){
        super.doMark(uid,msgId);
        MsgMarkFactory.getStrategyNoNull(MessageMarkTypeEnum.LIKE.getType()).unMark(uid,msgId);
    }
}
